<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 2016/6/6
 * Time: 14:30
 */
namespace common\repositories\common;

use common\repositories\BaseRepository;
use common\entities\common\MyscrmErpserviceaddressEntity;
use Yii;

class MyscrmErpserviceaddressRepository extends BaseRepository {

    /**
     * 记录是否存在
     * @param string $addressName
     * @param string $orgId
     * @return bool
     */
    public function isExists($addressName, $orgId)
    {
        return MyscrmErpserviceaddressEntity::find()
            ->where(['AddressName' => $addressName, 'OrganizationId' => $orgId])
            ->exists();
    }

}